/*
 * Copyright 2016 Wealth Inc. All rights reserved.
 */
package com.wealth.order.service;

import iaas.service.IBaseService;
import iaas.utils.ResultObject;
import iaas.web.JqGridRequest;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.data.domain.Page;

import com.wealth.cart.entity.Cart;
import com.wealth.order.entity.OrderPlat;
import com.wealth.order.vo.OrderVO;

/**
 * @author chan
 * @version 1.0
 * @since 1.
 */

public interface IOrderPlatService extends IBaseService<OrderPlat> {

	/**
	 * 分页查询
	 * 
	 * @param corpid
	 * @param request
	 * @param clz
	 * @return
	 * @throws Exception
	 */
	public Page<OrderPlat> getOrderPlat(Long corpid, JqGridRequest request,
			Class<OrderPlat> clz) throws Exception;

	/** ---------------- 微信端 ---------------- */
	/** 保存银行订单 */
	public ResultObject saveOrder(Long corpid, Long memberid, Long marketid,
			Long addressid, Long couponRecordId, Integer paymode,Long pickedId)
			throws Exception;

	/** 支付银行订单 */
	public void payOrder(OrderPlat orderPlat) throws Exception;

	/** 保存银行订单 - 惠生活 */
	public ResultObject saveOrderForHuiLife(Long corpid, Long memberid,
			Long goodsid, Integer amount, Long addressid, Integer paymode)
			throws Exception;

	/** 保存订单前 获取购物车的数据 */
	public OrderVO getVoBeforeSaveOrder(Integer paymode, Long addressId,
			Long couponRecordId, Long marketId, Long memberid,Cart cart) throws Exception;

	/** 计算使用优惠券后的金额 */
	public double getCouponAfterTotal(double total,Long couponRecordId);
	
	/** 判断库存 */
	public boolean checkInventory(OrderPlat orderPlat) throws Exception;
	
	
	/** 导出Excel 文件  */
	public HSSFWorkbook  exportFile(String startTime,String endTime,Integer paystatus);

	//wap 任务调度 查询订单未支付方法
	public boolean quartzOrder(Integer status);
}
